A caching server accelerates content delivery by retaining a local copy of requested content closer to the requestors than an origin location from where the content is initially generated. The caching server serves local copy of the content to those requestors and the requestors receive the content without the added latency from traversing the additional network hops to the origin location. A portion of the caching server memory or storage is allocated as a cache for storing local copies of different content.
The cache is a limited resource. As such, the caching server uses various techniques to retain the content that is most frequently requested in cache. Nevertheless, there is a penalty every time a request arrives for content that is not cached, and the caching server has to retrieve the content from its origin location before serving the retrieved content to the requestor. Although increasing the amount of physical memory or storage is one way to increase the size of the cache, the number of locally cached content, and the cache-hit ratio of the caching server, the cost for doing so becomes prohibitive at some point.
File compression is another way to increase the cache size. File compression involves compressing the content files in order to reduce the file sizes before the files are entered into the cache. Compression however has shortcomings limiting its adoption for caching server applications. First, there is a performance penalty associated with decompressing compressed files from cache before they can be served to a requestor. Every millisecond is crucial to the end user experience. Decompressing a large file can take several milliseconds, and sometimes seconds. Second, compressing and decompressing content consumes processing resources of the caching server. Any such diversion of resources can slow the responsiveness of the caching server, especially when those resources are needed to receive and respond to other content requests. Third, compression in many instances can be a wasted operation. Certain files and file types receive little to no benefit from being compressed, and simply introduce the aforementioned delay while consuming server resources. In other words, there is a minimal increase in the overall cache of the caching server when compressing certain files and file types, thus providing little to no improvement in the cache-hit ratio of the caching server even though the time and resources are expended to perform the compression.
Since caching servers perform a time sensitive task, especially caching servers delivering video and audio, compression is not commonly used for content delivery applications. Nevertheless, there remains a need to improve cache-hit ratios of the caching servers without the cost of allocating additional resources. More specifically, there is a need to improve cache-hit ratios by increasing the cache of a caching server without degrading performance of that caching server.